import config from '@/config'
import request from '@/utils/request'
//商品列表
export function getGoodLists(params: any) {
    return request.get({ url: '/goods.goods/lists', params })
}
//新增商品
export function addGood(params: any) {
    return request.post({ url: '/goods.goods/add', params })
}
//删除商品
export function delGoods(params?: any) {
    return request.post({ url: '/goods.goods/del', params })
}
//修改商品状态
export function statusGoods(params?: any) {
    return request.post({ url: '/goods.goods/status', params })
}

//商品分类
export function getGoodsCategory(params?: any) {
    return request.get({ url: '/goods.goods_category/lists', params })
}
//添加商品分类
export function addGoodsCategory(params?: any) {
    return request.post({ url: '/goods.goods_category/add', params })
}
//删除商品分类
export function delGoodsCategory(params?: any) {
    return request.post({ url: '/goods.goods_category/del', params })
}
//商品分类详情
export function Categorydetail(params?: any) {
    return request.get({ url: '/goods.goods_category/detail', params })
}
//商品编辑
export function editCategory(params?: any) {
    return request.post({ url: '/goods.goods_category/edit', params })
}
//修改商品状态
export function changeCategoryStatus(params?: any) {
    return request.post({ url: '/goods.goods_category/status', params })
}
//保障服务
export function getguaranteeLists(params?: any) {
    return request.get({ url: '/goods.goods_guarantee/lists', params })
}
//添加保障服务
export function addguarantee(params?: any) {
    return request.post({ url: '/goods.goods_guarantee/add', params })
}
//删除保障服务
export function delguarantee(params?: any) {
    return request.post({ url: '/goods.goods_guarantee/del', params })
}
//修改商品状态
export function changeguaranteeStatus(params?: any) {
    return request.post({ url: '/goods.goods_guarantee/status', params })
}
//保障服务详情
export function Guaranteedetial(params?: any) {
    return request.get({ url: '/goods.goods_guarantee/detail', params })
}
//服务编辑
export function editGuarantee(params?: any) {
    return request.post({ url: '/goods.goods_guarantee/edit', params })
}
//商品品牌
export function getBrandList(params?: any) {
    return request.get({ url: '/goods.goods_brand/lists', params })
}

// 其他品牌列表
export function getBrandListOther(params?: any) {
    return request.get({ url: '/goods.goods_brand/otherLists', params })
}

//添加品牌
export function addBrand(params?: any) {
    return request.post({ url: '/goods.goods_brand/add', params })
}
//品牌详情
export function Branddetial(params?: any) {
    return request.get({ url: '/goods.goods_brand/detail', params })
}
//编辑品牌
export function editBrand(params?: any) {
    return request.post({ url: '/goods.goods_brand/edit', params })
}
//修改品牌状态
export function changeBrandStatus(params?: any) {
    return request.post({ url: '/goods.goods_brand/status', params })
}
//删除品牌状态
export function delBrand(params?: any) {
    return request.post({ url: '/goods.goods_brand/del', params })
}
//商品单位列表
export function getUnitList(params?: any) {
    return request.get({ url: '/goods.goods_unit/lists', params })
}
//新增单位
export function addUnit(params?: any) {
    return request.post({ url: '/goods.goods_unit/add', params })
}
//删除单位
export function delUnit(params?: any) {
    return request.post({ url: '/goods.goods_unit/del', params })
}
//编辑单位
export function editUnit(params?: any) {
    return request.post({ url: '/goods.goods_unit/edit', params })
}
//单位详情
export function Unitdetail(params?: any) {
    return request.get({ url: '/goods.goods_unit/detail', params })
}



//商品分类列表
export function shopGoodslist(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods_cat/list', params })
}
//商品分类列表-树状结构
export function shopCatListTree(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods_cat/catListTree', params })
}
//添加分类
export function shopCatListAdd(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods_cat/add', params })
}
//添加分类
export function shopCatListDetail(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods_cat/detail', params })
}
//编辑分类
export function shopCatListEdit(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods_cat/edit', params })
}
//删除分类
export function shopCatListDel(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods_cat/del', params })
}
//删除分类
export function shopCatListQuickEdit(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods_cat/quickEdit', params })
}

//商品列表
export function shopGoodsList(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods/list', params })
}

//删除商品
export function delGoodsList(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods/del', params })
}

//快捷修改
export function quickEdit(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods/quickEdit', params })
}

//生成商品SKU编码
export function generateGoodsSkuCode(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods/generateGoodsSkuCode', params })
}

//添加商品
export function goodAdd(params?: any) {
    return request.post({url: '/admin.shop.shop_goods/add', params})
}

// 商品详情
export function Gooddetail(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods/detail', params })
}

//编辑商品
export function Goodsedit(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods/edit', params })
}

//恢复已删除的商品
export function rollbackDel(params?: any) {
    return request.post({ url: '/admin.shop.shop_goods/rollbackDel', params })
}


//积分券商品列表
export function goodsRedList(params?: any) {
    return request.get({ url: '/admin.shop.goods_red/list', params })
}
//积分券添加商品
export function addGoodKu(params?: any) {
    return request.post({ url: '/admin.shop.goods_red/add', params })
}
//积分券编辑商品
export function editGoodKu(params?: any) {
    return request.post({ url: '/admin.shop.goods_red/edit', params })
}
//积分券商品详情
export function detailGoodKu(params?: any) {
    return request.post({ url: '/admin.shop.goods_red/detail', params })
}
//快捷修改
export function goodsRedEdit(params?: any) {
    return request.post({ url: '/admin.shop.goods_red/quickEdit', params })
}
//积分券商品删除
export function goodsRedDel(params?: any) {
    return request.post({ url: '/admin.shop.goods_red/del', params })
}
//恢复积分券商品
export function goodsRedRollbackDel(params?: any) {
    return request.post({ url: '/admin.shop.goods_red/rollbackDel', params })
}
